package tcdx.uap.controller;

import com.github.pagehelper.PageHelper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import tcdx.uap.common.entity.AjaxResult;
import tcdx.uap.common.entity.page.TableDataInfo;
import tcdx.uap.common.utils.MapUtils;
import tcdx.uap.common.utils.SqlUtil;
import tcdx.uap.mapper.BaseDBMapper;
import tcdx.uap.mapper.SystemMapper;

import java.util.List;
import java.util.Map;

/**
 * 通用请求处理
 * 
 * @author ruoyi
 */
@Controller
@RequestMapping("/uap/system")
public class SystemController extends BaseController
{
    private static final Logger log = LoggerFactory.getLogger(SystemController.class);

    @Autowired
    SystemMapper systemMapper;

    @Autowired
    BaseDBMapper baseDBMapper;
    /**
     * 查询运已经部署的流程定义
     * @param map ajax传入的参数
     * @return AjaxResult
     */
//    @RequiresPermissions("system:system:get_sys_menu")
    @PostMapping("/get_sys_menu")
    @ResponseBody
    public AjaxResult get_sys_menu(@RequestBody Map<String, Object> map)
    {
        List list= systemMapper.selectSysMenu(map);
        return AjaxResult.success("suc",list);

    }
    /**
     * 查询运已经部署的流程定义
     * @param map ajax传入的参数
     * @return AjaxResult
     */

    //    @RequiresPermissions("system:system:get_sys_menu")
    @PostMapping("/get_userlist")
    @ResponseBody
    public TableDataInfo get_userlist(@RequestBody Map<String, Object> map)
    {
        Object staff_nm = map.get("staff_nm");
        Object group_id = map.get("group_id");
        //查询表单
        startPage(map);
        List<Map> list = systemMapper.selectSysUser(map);
        return getDataTable(list);
    }
}
